#ifndef ROUND_PARAM_H
#define ROUND_PARAM_H

#include <math.h>

static double round(double value, int digits) {
	const double p = pow(10.0, digits);
	return floor(value*p + 0.5)/p;
}

static float round(float value, int digits) {
	const float p = pow(10.0f, digits);
	return floor(value*p + 0.5f)/p;
}

#endif //ROUND_PARAM_H
